home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 2
/
Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso
/
Pearls
/
mus
/
DASModPlayer
/
Rexx
/
makelistall.drx
< prev
next >
Wrap
Text File
|
1994-09-23
|
4KB
|
144 lines
/*
Make Module List, D.A.S ModulePlayer REXX-script for making modulelists!
V0.01 Based on makelist.drx. Will print everything (except realname)
If you want something removed or something in different order, then
you can either change it here or take examples from other makelist.drx
scripts.
*/
OPTIONS Results
ADDRESS 'DASMP'
signal on error
signal on syntax
signal on ioerr
signal on break_c
signal on break_d
unknownauthor = 'Unknown'
indexwidth = 4
namewidth = 25
authorwidth = 25
stylewidth = 15
timewidth = 6
datewidth = 9
sizewidth = 7
chanwidth = 2
typewidth = 8
MODCOUNT
modcounter=result
say ''
say 'Make List All for D.A.S Moduleplayer, V0.01 by Pauli Porkka'
say 'You have 'modcounter' modules in your list currently loaded to D.A.S'
call writech(stdout, 'Do you want to list them all (Y/N)? ')
answer = readln(stdin)
answer = upper(answer)
if answer='Y' then do
startlist = 0
endlist = modcounter
END
else DO
call writech(stdout, 'Enter starting position (0-'modcounter')? ')
startlist = readln(stdin)
call writech(stdout, 'Enter ending position ('startlist+1'-'modcounter')? ')
endlist = readln(stdin)
END
say ''
listmode = 'ALL'
call writech(stdout, 'Module list mode, ALL/KNOWN/UNKNOWN (A/K/U)?')
answer = readln(stdin)
answer = upper(answer)
if answer='K' then listmode='KNOWN'
if answer='U' then listmode='UNKNOWN'
call writech(stdout, 'List to File or Screen (F/S)? ')
answer = readln(stdin)
answer = upper(answer)
if answer='F' then DO
listfile='YES'
call writech(stdout, 'Enter pathfilename for the list? ')
listfilename = readln(stdin)
END
else
listfile='NO'
listheader1 = left("Num", indexwidth)' 'left("Module name", namewidth)' 'left("CH", chanwidth)' 'left("Type", typewidth)' 'left("Author", authorwidth)' 'left("Style", stylewidth)' 'left("Length", timewidth)' 'left("Date", datewidth)' 'left("Size", sizewidth)
listheader2 = '-----------------------------------------------------------------------------------------------'
if listfile='YES' then DO
call open(listfilehandle, listfilename, 'W')
call writeln(listfilehandle, listheader1)
call writeln(listfilehandle, listheader2)
END
else DO
say listheader1
say listheader2
END
modulecount=0
DO modspec= startlist to endlist
MOVETO modspec
GETAUTHOR
authorspec=result
printline=0
if listmode='ALL' then printline=1
if ((listmode='KNOWN') & (authorspec ~= 'Unknown')) then printline = 1
if ((listmode='UNKNOWN') & (authorspec = 'Unknown')) then printline = 1
if printline=1 then DO
modulecount=modulecount+1
MODNAME
namespec=result
GETSTYLE
stylespec=result
stylespec=strip(stylespec,L,'-')
GETTIME
timespec=result
GETDATE
datespec=result
GETSIZE
sizespec=result
GETTYPE
typespec=result
GETCHANS
chanspec=result
moduleline = left(modulecount, indexwidth)' 'left(namespec, namewidth)' 'left(chanspec, chanwidth)' 'left(typespec, typewidth)' 'left(authorspec, authorwidth)' 'left(stylespec, stylewidth)' 'left(timespec, timewidth)' 'left(datespec, datewidth)' 'right(sizespec, sizewidth)
if listfile='NO' then DO
say moduleline
END
else
call writeln(listfilehandle, moduleline)
END
END
if listfile='YES' then
call close(listfilehandle)
EXIT
error:
syntax:
say 'Error at line 'sigl' in MakeListAll V0.1'
EXIT
break_c:
break_d:
say 'Received a BREAK signal, aborted...'
EXIT
ioerr:
say 'I/O Error at line 'sigl
EXIT